<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{$config_sitename}</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="__CSS__/recipesh.css?t={$ver}" rel="stylesheet">
<style>
.recipe-poblish-step-img .added-img, .poblish-img-list .added-img {
	background-size: cover;
}
</style>
</head>
<body class="body-pad cl-b-lgrey body-no-pb">
	<div class="loading-wrapper">
		<div class="loading"></div> 
	</div>
	<div class="ub ub-ac page-header">
		<a href="javascript:history.back();" class="clickable"><span class="icon-back"></span></a>
		<div class="ub-f1 page-name">发布食谱</div>
		<a href="javascript:;" class="clickable cl-f-lorange poblish-submit work-add" data-type="yes">
			发布
		</a>
	</div>
	<form class="recipe-poblish-form poblish-form workForm" data-url="{:U('Work/add')}"> 
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<p class="f16">食谱名称</p>
			<input type="text" class="form-control" name="title" placeholder="请输入食谱名称">
			<div class="recipe-type-section">
				<div class="ub poblish-block-title ub-pj ub-ae"><p class="f16">发布至</p><span class="f14 cl-f-lgrey">只选一项</span></div>
				<ul class="recipe-type-list">
				<foreach name="category" item="cg">
					<li data-id="{$cg.cateid}"><p class="ub cl-f-grey ub-ac">{$cg.catename}<span class="ub-f1 icon-drop"></span></p></li>
				</foreach>
				</ul>
				<input type="hidden" name="cateid">
			</div>
		</div>
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<div class="ub poblish-block-title ub-pj ub-ae"><p class="f16">上传图片</p><span class="f14 cl-f-lgrey">首张为主图</span></div>
			<ul class="poblish-img-list">
			   	<li class="poblish-img-add">
					<img src="__IMAGES__/o2.png" class="oimg">
					<div class="ub ub-ver ub-ac poblish-img-addtxt">
						<span class="icon-plus"></span>
						<p>添加图片</p>
					</div>
			   	</li>
			</ul>
		</div>
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<p class="f16">简介</p>
			<textarea class="form-control" name="content" placeholder="告诉我们这个食谱的故事吧~"></textarea>
		</div>
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<div class="ub poblish-block-title ub-pj ub-ae"><p class="f16">用料</p><span class="f14 cl-f-lgrey">至少填写一个用料</span></div>
			<ul class="recipe-poblish-material-list">
				<li class="ub ub-ac ub-pj">
					<div class="ub-f1">
						<input type="text" class="form-control" name="mname[]" placeholder="配料">
					</div>
					<div class="ub-f1">
						<input type="text" class="form-control" name="mvalue[]" placeholder="适量">
					</div>
					<img src="__IMAGES__/icon-minus.png" class="recipe-material-minus">
				</li>
				<li class="ub ub-ac ub-pj">
					<div class="ub-f1">
						<input type="text" class="form-control" name="mname[]" placeholder="配料">
					</div>
					<div class="ub-f1">
						<input type="text" class="form-control" name="mvalue[]" placeholder="适量">
					</div>
					<img src="__IMAGES__/icon-minus.png" class="recipe-material-minus">
				</li>
				<li class="ub ub-ac ub-pc recipe-poblish-addrow clickable">
					<img src="__IMAGES__/icon-add.png">
					<p class="cl-f-lorange f16">添加</p>
				</li>
			</ul>
		</div>
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<div class="ub poblish-block-title ub-pj ub-ae"><p class="f16">步骤</p><span class="f14 cl-f-lgrey">至少填写3个步骤</span></div>
			<ul class="recipe-poblish-step-list">
				<li class="ub ub-pj">
					<div class="recipe-poblish-step-img">
						<img src="__IMAGES__/o2.png" class="oimg">
						<div class="ub ub-ver ub-ac poblish-img-addtxt">
							<span class="icon-plus"></span>
							<p>添加图片</p>
						</div>
						<div class="added-img" style="background-image:url()">
							<!-- 将上传的图片路径传到background-image中即可显示 -->
							<input type="hidden" name="simage[]" value="123">
						</div> 
					</div>
					<div class="ub-f1">
						<textarea class="form-control cl-f-grey" name="scontent[]" placeholder="请输入步骤描述"></textarea>
					</div>
					<img src="__IMAGES__/icon-minus.png" class="recipe-material-minus">
				</li>
				<li class="ub ub-pj">
					<div class="recipe-poblish-step-img">
						<img src="__IMAGES__/o2.png" class="oimg">
						<div class="ub ub-ver ub-ac poblish-img-addtxt">
							<span class="icon-plus"></span>
							<p>添加图片</p>
						</div>
						<div class="added-img" style="background-image:url()">
							<!-- 将上传的图片路径传到background-image中即可显示 -->
							<input type="hidden" name="simage[]" value="123">
						</div> 
					</div>
					<div class="ub-f1">
						<textarea class="form-control cl-f-grey" name="scontent[]" placeholder="请输入步骤描述"></textarea>
					</div>
					<img src="__IMAGES__/icon-minus.png" class="recipe-material-minus">
				</li>
				<li class="ub ub-pj">
					<div class="recipe-poblish-step-img">
						<img src="__IMAGES__/o2.png" class="oimg">
						<div class="ub ub-ver ub-ac poblish-img-addtxt">
							<span class="icon-plus"></span>
							<p>添加图片</p>
						</div>
						<div class="added-img" style="background-image:url()">
							<!-- 将上传的图片路径传到background-image中即可显示 -->
							<input type="hidden" name="simage[]" value="123">
						</div> 
					</div>
					<div class="ub-f1">
						<textarea class="form-control cl-f-grey" name="scontent[]" placeholder="请输入步骤描述"></textarea>
					</div>
					<img src="__IMAGES__/icon-minus.png" class="recipe-material-minus">
				</li>
				<li class="ub ub-ac ub-pc recipe-poblish-addrow clickable">
					<img src="__IMAGES__/icon-add.png">
					<p class="cl-f-lorange f16">添加</p>
				</li>
			</ul>
		</div>
		<div class="row recipe-poblish-block cl-b-white poblish-block">
			<p class="f16">小贴士</p>
			<textarea class="form-control" name="note" placeholder="请输入你的小贴士~"></textarea>
		</div>
	</form>
	<div class="alert-type-layer cl-b-oblack">
		<div class="cl-b-white alert-type-content">
			<ul class="alert-type-list">
			</ul>
			<div class="cl-b-xdgrey cl-f-white alert-type-cancel">取消</div>
		</div>
	</div>
	<script src="__JS__/jquery-1.11.1.min.js?t={$ver}"></script>
	<script src="__JS__/jquery.lazyload.min.js?t={$ver}"></script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
    var img_url = "__IMAGES__";
    var jsdk = {$jsdk};
	wx.config({
		debug: false,
		appId: jsdk.appId,
		timestamp: jsdk.timestamp,
		nonceStr: jsdk.nonceStr,
		signature: jsdk.signature,
		jsApiList: [
	  		'chooseImage',
	  		'uploadImage',
	  		'downloadImage'
		]
	});
	</script>
	<script src="__JS__/custom.js?t={$ver}"></script>
	<script src="__JS__/work.js?t={$ver}"></script>
	<script src="__JS__/common.js?t={$ver}"></script>
	<script src="__JS__/post.js?t={$ver}"></script>
</body>
</html>